package cn.neusoft.service;

import cn.neusoft.domain.Commodity;
import cn.neusoft.query.BaseQuery;
import cn.neusoft.vo.PageBean;
import org.springframework.stereotype.Service;

import java.math.BigInteger;
import java.util.List;


public interface CommodityService {

    void add(Commodity commodity);
    List<Commodity> getAll();

    void update(Commodity commodity);
    void delete(String id);
    Commodity getById(String id);

    List<Commodity> getByName(String name);

    List<Commodity> getCommoditiesByPage(int page, int pageSize);

    int getTotalCount();

    // 添加根据商品名字返回所在仓库的名字和商品在该仓库内的数量的方法
    List<Commodity> getCommoditiesWithWarehouseInfoByName(String name);

    PageBean<Commodity> findByPage(BaseQuery query);

}
